public function SectionIsPresent(section, iniDB) result(isHere)
return true if section is present, false otherwise
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
character(len=*),
|
intent(in) |
|
|
:: |
section |
|
type(IniList),
|
intent(in) |
|
|
:: |
iniDB |
|
Return Value
logical
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
integer(kind=long),
|
public |
|
:: |
i |
|
|
|
Source Code
FUNCTION SectionIsPresent &
!
(section, iniDB) &
!
RESULT (isHere)
IMPLICIT NONE
! subroutine arguments
! Scalar arguments with intent(in):
TYPE (IniList) , INTENT(IN) :: iniDB
CHARACTER (LEN = *), INTENT(IN) :: section
! Local Scalars:
LOGICAL :: isHere
INTEGER (KIND = long) :: i
!------------end of declaration------------------------------------------------
isHere = .FALSE.
DO i = 1, iniDB % nOfSections
IF (iniDB % sectionName (i) == section ) THEN
isHere = .TRUE.
RETURN
END IF
END DO
END FUNCTION SectionIsPresent